//@ sourceURL=IllegalForm.js
IllegalForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        IllegalForm.superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "违章信息",
            iconCls : "menu-flowWait",
            width : 620,
            height : 450
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/illegalmanage/saveIllegal.do",
                items:[
                {
                    id : "illegal.id",
                    name : "illegal.id",
                    xtype : "hidden",
                    value : this.id == null ? "": this.id
                }, {
                    name : "illegal.years",
                    xtype : "hidden",
                    id : "illegal.years",
                    value : this.years == null ? "" : this.years
                },{
				layout : "column",
				//      border:false,
				bodyStyle : "padding:5px;",
				items : [
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '检查名称'
										+ '<font color=red>*</font>',
								id : "illegal.checkName",
								name : "illegal.checkName",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "检查名称不能为空！"
							} ]
						},
						{
							layout : "form",
							border : false,
							columnWidth : .5,
							items : [ {
								fieldLabel : "违章名称",
								name : "illegal.illegalName",
								xtype : "textfield",
								maxLength : 80,
								width : 146,
								allowBlank : true 
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '违章地点'
										+ '<font color=red>*</font>',
								id : "illegal.illegalPlace",
								name : "illegal.illegalPlace",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "违章地点不能为空！"
							} ]
						},
						{
							layout : "form",
							border : false,
							columnWidth : .5,
							items : [ {
								fieldLabel : "违章负责人",
								name : "illegal.principal",
								xtype : "textfield",
								maxLength : 80,
								width : 146,
								allowBlank : true
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "datefield",
								fieldLabel : '违章时间'
										+ '<font color=red>*</font>',
								id : "illegal.illegaDate",
								format : "y-m-d",
								name : "illegal.illegaDate",
								width : 146,
								allowBlank : false,
								blankText : "违章时间不能为空！"
							} ]
						},
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "datefield",
								fieldLabel : '检查时间'
										+ '<font color=red>*</font>',
								id : "illegal.checkDate",
								format : "y-m-d",
								name : "illegal.checkDate",
								width : 146,
								allowBlank : false,
								blankText : "检查时间不能为空！"
							}]
			      },{
			    		  columnWidth : 1.,//第一列 
						  layout : "form",
						  border : false,
						 //bodyStyle : "padding:5px;",
						  items : [ {
							xtype : "textarea",
							fieldLabel : '通告批评',
							name : 'illegal.criticism',
							width : 448
						} ]
			    	
			     }
                 ]
                }] 	
            },
            loadData:{
                getUrl:__ctxPath +"/illegalmanage/getIllegal.do",
                preName : "illegal"
            },
            isShow : this.isShow
        });
    }
});
